# installation library
import zipfile
import utilities.Environment as ENV
from utilities.path import path

class Installer(object):
    def __init__(self):
        pass
    def unzip_datapath(self):
        # unzips the data.zip package
        z = zipfile.ZipFile(ENV.datapath / "data.zip")
        for entry in z.namelist():
            fd = path(ENV.datapath / entry)
            if fd.count(".") == 0 and not fd.exists():
                fd.mkdir(1)
            else:
                # save the file
                fd.write_bytes(z.read(entry))
        